<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>帖子列表</title>

    <link
      rel="shortcut icon"
      href="https://static.jyshare.com/images/favicon.ico"
    />
    <link
      rel="stylesheet"
      href="//at.alicdn.com/t/c/font_4522611_wieqaqu8q4.css"
    />

    <link rel="stylesheet" href="<?php echo DIR_PUBLIC; ?>/css/reset.css" />
    <link rel="stylesheet" href="<?php echo DIR_PUBLIC; ?>/css/public.css" />
    <link
      rel="stylesheet"
      href="<?php echo DIR_PUBLIC; ?>/css/list_father.css"
    />
  </head>

  <body>
    <div class="header">
      <div class="logo">
        <a href="http://127.24.6.11/">智慧璇玑</a>
      </div>
      <div class="banner">
        <a href="http://127.24.6.11/">首页</a>
        <a href="<?php echo DIR_MODEL; ?>/publish.php">新帖</a>
        <a href="<?php echo DIR_MODEL; ?>/list_father.php" class="active"
          >话题</a
        >
      </div>
      <div class="put">
        <form action="<?php echo DIR_MODEL; ?>/list_son.php">
          <input type="text" name="keyword" />
          <button>搜索</button>
        </form>
      </div>
      <ul>
        <li>
          <a href="<?php echo DIR_MODEL; ?>/login.php">登录</a>&nbsp;/&nbsp;
          <a href="<?php echo DIR_MODEL; ?>/register.php">注册</a>
        </li>
        <li>
          <a href="<?php echo DIR_MODEL; ?>/upload_img.php">
            <span class="iconfont icon-geren"></span>&nbsp;个人中心
          </a>
        </li>
        <li>
          <a href="./logout.php">
            <span class="iconfont icon-kaiguan"></span>&nbsp;注销
          </a>
        </li>
      </ul>
    </div>

    <div class="content">
      <div class="auto">
        <span class="iconfont icon-shouye"></span><a>首页</a> &gt; <a>云计算</a>
      </div>
      <div class="main">
        <div class="left">
          <h3>云计算</h3>

          <div class="num">
            今日：<span>7</span>&nbsp;&nbsp; 总帖：<span>16852</span>
            <div class="moderator">
              子版块：<a href="">大数据</a><a href="">基础</a>
            </div>
          </div>

          <div class="pages-wrap">
            <ul class="postsList">
              <?php while($row = mysql_fetch_assoc($result)) : ?>
              <?php
                    $rep_sql = "select max(rep_time) as last_time,count(*) as rep_num from reply where rep_pub_id = {$row['pub_id']}";
                    $rep_result = my_query($rep_sql);
                    $rep_row = mysql_fetch_assoc($rep_result);
                    $rep_time = $rep_row['last_time'];
                    $rep_num = $rep_row['rep_num'];
                ?>
              <li>
                <div class="smallPic">
                  <a href="">
                    <img src="../uploads/images/<?php echo $row['user_image']; ?>" alt="" />
                  </a>
                </div>
                <div class="subject">
                  <div class="titleWrap">
                    <p>[帖子]</p>
                    <h2>
                      <a
                        href="./show.php?pub_id=<?php echo $row['pub_id']; ?>&action=reply"
                      >
                        <?php echo $row['pub_title']; ?>
                      </a>
                    </h2>
                  </div>
                  <p>
                    楼主：<?php echo $row['pub_owner'] ?>&nbsp; <br /><br />
                    <?php echo date('Y-m-d H:i:s',$row['pub_time']) ?>&nbsp;
                    最后回复：<?php echo $rep_num == 0 ? '暂无回复' : date('Y-m-d H:i:s',$rep_time) ?>
                  </p>
                </div>
                <div class="count">
                  <p>
                    回复<br /><span><?php echo $rep_num; ?></span>
                  </p>
                  <p>
                    浏览<br /><span><?php echo $row['pub_hits']; ?></span>
                  </p>
                </div>
              </li>
              <?php endwhile; ?>
            </ul>
          </div>
          <div class="pages">
            <?php echo $strPage; ?>
          </div>
        </div>

        <div class="right">
          <div class="title">列表</div>
          <ul class="list-wrap">
            <li>
              <h2><a href="#">全媒体</a></h2>
              <ul>
                <li>
                  <span class="iconfont icon-jianji"></span>
                  <h3><a href="">剪辑</a></h3>
                </li>
                <li>
                  <span class="iconfont icon-duanshipin"></span>
                  <h3><a href="">短视频</a></h3>
                </li>
                <li>
                  <span class="iconfont icon-yunying"></span>
                  <h3><a href="">运营</a></h3>
                </li>
              </ul>
            </li>
            <li>
              <h2><a href="#">云计算</a></h2>
            </li>
          </ul>
        </div>
      </div>
    </div>

    <div class="footer">
      <div class="footer-title">智慧璇玑</div>
      <div class="footer-content">
        Copyright &copy; 2024 智慧璇玑 All Rights Reserved
      </div>
    </div>
  </body>
</html>
